<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>无标题页</title>
<link rel="stylesheet" type="text/css" href="http://sandbox.runjs.cn/uploads/rs/55/sjckzedf/lanrenzhijia.css">
<link rel="stylesheet" type="text/css" href="../Admin/role/css/index.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!-- 小弹窗 -->
<script type="text/javascript" src="http://sandbox.runjs.cn/uploads/rs/55/sjckzedf/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('.theme-login').click(function(){
		$('.theme-popover-mask').fadeIn(100);
		$('.theme-popover').slideDown(200);
	})
	$('.theme-poptit .close').click(function(){
		$('.theme-popover-mask').fadeOut(100);
		$('.theme-popover').slideUp(200);
	})

})
</script>
</head>
<body class="mian_bj">
<div class="mian_top_01">
<div class="mian_top_r"></div>
<div class="mian_top_l"></div>
<div class="mian_top_c">
</div>
<div class="mian_b">
<!-- <div class="mian_b1">
<a class="mian_b1_a1" href="toAdd.do" title="添加"></a>
<a class="mian_b1_a2" a href="javascript:void(0)" onclick="del()" title="删除"></a>
<p class="mian_b1_sousuo"><input name="" type="text"></p>
<a href="#" title="搜索"><p class="mian_b1_a3"></a>
<a href="#" title="最后"><p class="mian_b1_a4"></a>
<a href="#" title="下一页"><p class="mian_b1_a5"></a>
<p class="mian_b1_list">1 2 3 4……</p>
<a href="#" title="上一页"><p class="mian_b1_a6"></a>
<a href="#" title="最前"><p class="mian_b1_a7"></a>
</div> -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mian_b_bg">
<tr>
<td width="3%" class="mian_b_bg_lm"><input name="" type="checkbox" value="">&nbsp;</td>
<td width="5%" class="mian_b_bg_lm"><span></span>排序ID</td>
<td width="20%" class="mian_b_bg_lm"><span></span>角色名称</td>
<td width="20%" class="mian_b_bg_lm"><span></span>权限管理</td>
<td width="20%" class="mian_b_bg_lm"><span></span>查看权限</td>
</tr>
<tr>
   <td>
    <c:forEach var="list" items="${roles}">
    <tr>
						<td><input name="" type="checkbox" value="${list.id}">&nbsp;</td>
						<td id="${list.id}">${list.id}</td>
						<td>${list.rolename}</td>
						<td>   <a class="mian_b_icon_01" href="../Admin/updateRole.jsp">权限管理</a></td>
						<td>
<a class="btn btn-primary btn-large theme-login" href="javascript:;" id="quanxian" onclick="chakan('${list.id}')">查看权限</a></td>				
 				
    </tr> 
   
	</c:forEach>
   </td>
<td>
</tr>
</table>
</div>
</div>

<!-- 小弹窗 -->
<div class="theme-popover">
     <div class="theme-poptit">
          <a href="javascript:;" title="关闭" class="close">×</a>
          <h3>所拥有权限</h3>
     </div>
     <div class="theme-popbod dform" id="quanxiandiv">
     </div>
</div>
</body>
<script src="../Admin/role/js/jquery-1.7.1.min.js"></script>
 <script type="text/javascript">
		function chakan(roleid){			
			$.ajax({
				url : "../role/selectAllAuthorityByRoleIdLiu.action",
				type : "POST",
				dataType : "json",
				data : {
					"roleid" : roleid
					},
			success:function(data){
				jQuery.each(data.authorities, function(i,item){ 
					$('#quanxiandiv').append(item.name+" ");
			})
			}
					
			})
		}
</script>		
</html>
